LazyLoad.js([window.ControllerSite + "https://static.biyao.com/m/js/jquery.min.js?mbiyaov=" + window.version, window.ControllerSite + "https://static.biyao.com/m/js/base/mbiyao.js?mbiyaov=" + window.version, window.ControllerSite + "https://static.biyao.com/m/js/jquery.lazyload.min.js?mbiyaov=" + window.version, window.ControllerSite + "https://static.biyao.com/m/js/base/by.common.js?mbiyaov=" + window.version], function() {
	function o() {
		var o = e("categoryId"),
			r = {
				categoryID: o,
				pageSize: 20,
				pageIndex: i
			};
		$.ajax({
			type: "post",
			url: window.ControllerSite + "/classify/getCategoryList",
			dataType: "json",
			contentType: "application/x-www-form-urlencoded;charset=utf-8",
			data: r,
			success: function(o) {
				if (1 == o.success) {
					var e = o.data.pageCount;
					e > i ? i++ : $(".m_addmore_btn") && $(".m_addmore_btn").remove();
					var r = o.data.productList;
					t(r)
				} else OurBox.alert("网络连接失败，请稍候重试", function() {}, {
					width: "120"
				})
			},
			error: function() {
				OurBox.alert("网络连接失败，请稍候重试", function() {}, {
					width: "120"
				})
			}
		})
	}

	function t(o) {
		for (var t = "", e = 0; e < o.length; e++) {
			var r = window.ControllerSite + "/products/" + o[e].suId + ".html",
				n = "";
			1 == o[e].isShowIcon && (n = '<div class="c_pos c_new_icon"></div>'), t = '<a class="c_product_link" href="' + r + '"><div class="imgBox"><img class="indexpic" src="' + window.ControllerSite + 'https://static.biyao.com/m/img/base/zwpic1.png" data-original="' + o[e].imageUrl + '" alt=""/></div><div class="tit inaline">' + o[e].title + '</div><div class="price">￥' + o[e].price + "</div>" + n + "</a>", $(".c_product_list").append(t), $(".indexpic").lazyload({
				threshold: 50
			})
		}
	}

	function e(o) {
		var t = new RegExp("(^|&)" + o + "=([^&]*)(&|$)", "i"),
			e = window.location.search.substr(1).match(t);
		return null != e ? e[2] : ""
	}
	$(".m_title").html(supplierProductJson.title), null != supplierProductJson.header && void 0 != supplierProductJson.header && ($(".s_hot_product").removeClass("none"), $(".s_hot_product").attr("href", window.ControllerSite + "/products/" + supplierProductJson.header.suId + ".html"), $(".s_hot_product img").attr("src", supplierProductJson.header.imageUrl)), $(".m_share").on("click", function() {
		$(".sub_share_bg").removeClass("none"), $(".sub_share_bg")[0].addEventListener("touchmove", function(o) {
			o.preventDefault()
		})
	}), $(".ss_close,.sub_share_bg").bind("click", function() {
		$(".sub_share_bg").addClass("none")
	}), $("#shareimg").attr("nsrc", supplierProductJson.shareInfo.shareImageUrl).attr("ntitle", decodeURIComponent(e("title"))).attr("nurl", window.location.href).attr("ncon", supplierProductJson.shareInfo.shareContent), $("#shareimg").attr("wxsrc", supplierProductJson.shareInfo.shareImageUrl).attr("wxtitle", decodeURIComponent(e("title"))).attr("wxurl", window.location.href).attr("wxcon", supplierProductJson.shareInfo.shareContent);
	var r = supplierProductJson.productList;
	t(r);
	var n = supplierProductJson.pageCount;
	n > 1 && $("#min_hdiv").after('<div align="center" class="m_addmore_btn"><span>加载更多...</span></div>');
	var i = 2;
	$(".m_addmore_btn").on("click", function() {
		o()
	}), MBase.active.addactive(), LazyLoad.js([window.ControllerSite + "https://static.biyao.com/m/js/weixinshare.js?mbiyaov=" + window.version, window.ControllerSite + "https://static.biyao.com/m/js/product_new/share.js?mbiyaov=" + window.version, window.ControllerSite + "https://static.biyao.com/m/js/product_new/wxshare.js?mbiyaov=" + window.version], function() {})
});